package com.lzp.aop.service.impl;

import com.lzp.aop.antion.MyAOP;
import com.lzp.aop.service.ExtendTestService;
import org.springframework.stereotype.Service;

/**
 * @author : lzp
 * @version 1.0
 * @date : 2022/2/26 15:14
 * @apiNote : TODO
 */
@Service("TestServiceImpl")
@MyAOP
public class TestServiceImpl implements ExtendTestService {
    @Override
    public String testMethod(String string) {
        System.out.println("这是一号 testMethod 类上有aop:"+string);
        return "success";
    }
    @Override
    public String testMethodThrow2(String num) {
        throw new RuntimeException("这是一号 testMethodThrow2 类上有aop:"+num);
    }
}
